﻿// -----------------------------------------------------------------------
// <copyright file="ExceptionWindow.xaml.cs" company="Softserve">
// Опрацьовую вхідну інформацію і парсить її
// </copyright>
// -----------------------------------------------------------------------
namespace WebServer
{
    using System;
    using System.Windows;
    using WebServer.BusinessLogic;

    /// <summary>
    /// Interaction logic for ExceptionWindow.xaml
    /// </summary>
    public partial class ExceptionWindow : Window
    {
        public ExceptionWindow()
        {
            InitializeComponent();
        }

        public ExceptionWindow(int oldPort) : this()
        {
            textBoxNewPort.Text = oldPort.ToString();
        }

        private void buttonOK_Click(object sender, RoutedEventArgs e)
        {
            Configurator.Instance.Port = Convert.ToInt32(textBoxNewPort.Text);
        }
    }
}
